package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.Map;

public class ProcureStorage {
    private String id;

    private String procureId;

    private String materialId;

    private String materialGrade;

    private String procureCount;
    private String procureExistCount;

    private String procurePrice;

    private String procureTotalPrice;

    private String procureStorageCode;

    private String remark;

    private String storageUserName;

    private String storageTime;

    private String storageStatus;
    private String storageCountStatus;

    private String status;

    private Date createTime;

    private Date updateTime;

    private String materialCode;
    private String materialName;
    private String itemName;
    private String itemAlias;
    private String measureUnit;
    private int count;

    private String procureCode;
    private String procureType;
    private String supplier;
    private String procureTime;
    private String procureStatus;
    private String processName;
    private String procureUser;
    private String surePayUser;
    private String payStatus;
    private String totalMoney;

    public static final transient Map<String, String> TYPESTATUSMAP =
            ImmutableMap.of("1", "合同", "2", "报销");

    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("0", "进行中", "1", "已完成", "2", "已取消");

    public static final transient Map<String, String> PAYSTATUSMAP =
            ImmutableMap.of("0", "未支付", "1", "已支付");


    public String getStorageCountStatusCn(){
        if(StringUtils.equals(getStorageCountStatus(),"1")){
            return "充足";
        }else if(StringUtils.equals(getStorageCountStatus(),"2")){
            return "紧张";
        }else if(StringUtils.equals(getStorageCountStatus(),"3")){
            return "不足";
        }
        return "";
    }
    public String getProcureTypeCn() {
        return TYPESTATUSMAP.get(getProcureType());
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getProcureId() {
        return procureId;
    }

    public void setProcureId(String procureId) {
        this.procureId = procureId == null ? null : procureId.trim();
    }

    public String getMaterialId() {
        return materialId;
    }

    public void setMaterialId(String materialId) {
        this.materialId = materialId == null ? null : materialId.trim();
    }

    public String getMaterialGrade() {
        return materialGrade;
    }

    public void setMaterialGrade(String materialGrade) {
        this.materialGrade = materialGrade == null ? null : materialGrade.trim();
    }

    public String getProcureCount() {
        return procureCount;
    }

    public void setProcureCount(String procureCount) {
        this.procureCount = procureCount == null ? null : procureCount.trim();
    }

    public String getProcurePrice() {
        return procurePrice;
    }

    public void setProcurePrice(String procurePrice) {
        this.procurePrice = procurePrice == null ? null : procurePrice.trim();
    }

    public String getProcureTotalPrice() {
        return procureTotalPrice;
    }

    public void setProcureTotalPrice(String procureTotalPrice) {
        this.procureTotalPrice = procureTotalPrice == null ? null : procureTotalPrice.trim();
    }

    public String getProcureStorageCode() {
        return procureStorageCode;
    }

    public void setProcureStorageCode(String procureStorageCode) {
        this.procureStorageCode = procureStorageCode == null ? null : procureStorageCode.trim();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getStorageUserName() {
        return storageUserName;
    }

    public void setStorageUserName(String storageUserName) {
        this.storageUserName = storageUserName == null ? null : storageUserName.trim();
    }

    public String getStorageTime() {
        return storageTime;
    }

    public void setStorageTime(String storageTime) {
        this.storageTime = storageTime == null ? null : storageTime.trim();
    }

    public String getStorageStatusCn() {
        if(StringUtils.equals("0",getStorageStatus())){
            return "待入库";
        }else if(StringUtils.equals("1",getStorageStatus())){
            return "进行中";
        }if(StringUtils.equals("2",getStorageStatus())){
            return "已完成";
        }if(StringUtils.equals("3",getStorageStatus())){
            return "已取消";
        }
        return "";
    }

    public String getStorageStatus() {
        return storageStatus;
    }

    public void setStorageStatus(String storageStatus) {
        this.storageStatus = storageStatus == null ? null : storageStatus.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getProcureExistCount() {
        return procureExistCount;
    }

    public void setProcureExistCount(String procureExistCount) {
        this.procureExistCount = procureExistCount;
    }

    public String getStorageCountStatus() {
        return storageCountStatus;
    }

    public void setStorageCountStatus(String storageCountStatus) {
        this.storageCountStatus = storageCountStatus;
    }

    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemAlias() {
        return itemAlias;
    }

    public void setItemAlias(String itemAlias) {
        this.itemAlias = itemAlias;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getMeasureUnit() {
        return measureUnit;
    }

    public void setMeasureUnit(String measureUnit) {
        this.measureUnit = measureUnit;
    }

    public String getProcureCode() {
        return procureCode;
    }

    public void setProcureCode(String procureCode) {
        this.procureCode = procureCode;
    }

    public String getProcureType() {
        return procureType;
    }

    public void setProcureType(String procureType) {
        this.procureType = procureType;
    }

    public String getSupplier() {
        return supplier;
    }

    public void setSupplier(String supplier) {
        this.supplier = supplier;
    }

    public String getProcureTime() {
        return procureTime;
    }

    public void setProcureTime(String procureTime) {
        this.procureTime = procureTime;
    }

    public String getProcureStatusCn() {
        return STATUSMAP.get(getProcureStatus());
    }

    public String getProcureStatus() {
        return procureStatus;
    }

    public void setProcureStatus(String procureStatus) {
        this.procureStatus = procureStatus;
    }

    public String getProcessName() {
        return processName;
    }

    public void setProcessName(String processName) {
        this.processName = processName;
    }

    public String getProcureUser() {
        return procureUser;
    }

    public void setProcureUser(String procureUser) {
        this.procureUser = procureUser;
    }

    public String getSurePayUser() {
        return surePayUser;
    }

    public void setSurePayUser(String surePayUser) {
        this.surePayUser = surePayUser;
    }

    public String getPayStatusCn() {
        return PAYSTATUSMAP.get(getPayStatus());
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public String getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(String totalMoney) {
        this.totalMoney = totalMoney;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}